//
//  ViewController11.swift
//  BankOfChina
//
//  Created by mac on 2023/11/19.
//

import UIKit
import SnapKit

class ViewController11: UIViewController,UITextFieldDelegate {
    @IBOutlet weak var pwdtextField: UITextField!
    var stringx:NSMutableString = NSMutableString()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        
//    
//        self.view.addSubview(self.progressView)
//        self.progressView.snp.makeConstraints { make in
//            make.left.top.right.equalToSuperview()
//            make.height.equalTo(4)
//        }
//        
//        GCDTimer.start(1, 60) {isFinish,count,intTimeCount in
//            self.progressView.progress = Float(0.45 * intTimeCount)
//            if (self.progressView.progress == 0.5){
//                self.progressView.isHidden = true
//            }
//        }
//        self.pwdtextField.delegate = self
    }
//    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
//            // Get the current text
//        if string == "" {
//            if stringx.length > 0 {
//                stringx.deleteCharacters(in: NSRange.init(location: stringx.length - 1, length: 1))
//            }
//            return true
//        }
//            stringx.append("●")
//            self.pwdtextField.text = String(stringx)           
//            return true
//        }

 
    override var preferredStatusBarStyle: UIStatusBarStyle {
      return .default
    }
    lazy var progressView:UIProgressView = {
       let progress = UIProgressView.init()
        progress.trackTintColor = UIColor.white
        progress.progressTintColor = UIColor.red
        return progress
    }()
 
    @IBAction func login(_ sender: Any) {
        UserDefaults.standard.set("1", forKey: "login")
        UserDefaults.standard.synchronize()
        self.navigationController?.popViewController(animated: true)
    }
    
    @IBAction func back(_ sender: Any) {
        self.navigationController?.popViewController(animated: true)
    }
}
